package com.chushouya.order.dto.admin.orderlog;

import com.chushouya.order.constants.OrderActionEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@ApiModel("订单日志")
@Data
public class OrderLogDTO {

    @ApiModelProperty("操作ID")
    private Long orderLogId;

    @ApiModelProperty("订单编号")
    private Long orderId;

    @ApiModelProperty("订单状态")
    private Integer orderStatus;

    @ApiModelProperty("操作内容")
    private String actionNote;

    @ApiModelProperty("操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("订单状态")
    private String textStatus;

    @ApiModelProperty("操作人")
    private String actionUser;

    @ApiModelProperty("订单状态")
    public String getTextStatus() {
        return OrderActionEnum.getDesc(this.getOrderStatus());
    }
}
